Skip to content

Conversation

lijinpei2008
Copy link
Contributor

Description

Mandatory Checklist

  • SHOULD update ChangeLog.md file(s) appropriately
    • Update src/{{SERVICE}}/{{SERVICE}}/ChangeLog.md.
      • A snippet outlining the change(s) made in the PR should be written under the ## Upcoming Release header in the past tense.
    • Should not change ChangeLog.md if no new release is required, such as fixing test case only.
  • SHOULD regenerate markdown help files if there is cmdlet API change. Instruction
  • SHOULD have proper test coverage for changes in pull request.
  • SHOULD NOT adjust version of module manually in pull request

Copy link

Thanks for your contribution! The pull request validation has started. Please revisit this comment for updated status.

@lijinpei2008 lijinpei2008 added the Breaking Change Release This PR contains breaking change label Aug 18, 2025
Copy link

To the author of the pull request,
This PR was labeled "Breaking Change Release" because it contains breaking changes.

  • According to our policy, breaking changes can only take place during major release and they must be preannounced.
  • Please follow our guide on the detailed steps.
  • Required: Please fill in the task below to facilitate our contact,you will receive notifications related to breaking changes.

@lijinpei2008 lijinpei2008 marked this pull request as ready for review August 22, 2025 10:34
@Copilot Copilot AI review requested due to automatic review settings August 22, 2025 10:34
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the autorest PowerShell generation tool from version 3 to version 4 for the Az.Compute module. The update introduces new API patterns, parameter sets, and breaking changes to support the newer autorest.powershell v4 generation framework.

Key changes include:

  • Migration from API versioned types to generic interface types in cmdlet signatures
  • Addition of new parameter sets with JSON file and string input options
  • Introduction of new identity-based parameter sets for better resource management

Reviewed Changes

Copilot reviewed 38 out of 38 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tools/StaticAnalysis/Exceptions/Az.Compute/BreakingChangeIssues.csv Added 35 new breaking change exceptions for type and parameter changes introduced by autorest v4
Multiple help/*.md files Updated parameter sets, types, and documentation to reflect new autorest v4 patterns
Multiple docs/*.md files Updated autorest-generated documentation with new parameter sets and type signatures
src/Compute/Compute.Autorest/generate-info.json Updated generation ID for new autorest v4 build
src/Compute/Compute.Autorest/README.md Removed explicit autorest v3 configuration and updated directive patterns
Multiple custom/*.ps1 files Updated custom cmdlet implementations with new type signatures and parameter sets

"Az.Compute","Get-AzGalleryApplicationVersion","Get-AzGalleryApplicationVersion","0","3000","The type of property 'ProvisioningState' of type 'Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersion' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState]' to 'System.String'.","Change the type of property 'ProvisioningState' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.GalleryProvisioningState]'."
"Az.Compute","Get-AzGalleryApplicationVersion","Get-AzGalleryApplicationVersion","0","3000","The type of property 'PublishingProfileReplicationMode' of type 'Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersion' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode]' to 'System.String'.","Change the type of property 'PublishingProfileReplicationMode' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationMode]'."
"Az.Compute","Get-AzGalleryApplicationVersion","Get-AzGalleryApplicationVersion","0","3000","The type of property 'PublishingProfileStorageAccountType' of type 'Microsoft.Azure.PowerShell.Cmdlets.Compute.Models.Api20220103.IGalleryApplicationVersion' has changed from 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType]' to 'System.String'.","Change the type of property 'PublishingProfileStorageAccountType' back to 'System.Nullable`1[Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.StorageAccountType]'."
"Az.Compute","Get-AzGalleryApplicationVersion","Get-AzGalleryApplicationVersion","0","2020","The cmdlet 'Get-AzGalleryApplicationVersion' no longer supports the type 'Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationStatusTypes' for parameter 'Expand'.","Change the type for parameter 'Expand' back to 'Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.ReplicationStatusTypes'."
Copy link
Preview

Copilot AI Aug 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] This breaking change from strongly-typed enum to string for the 'Expand' parameter reduces type safety. Consider if this change is necessary or if the enum type can be preserved to maintain compile-time validation.

Copilot uses AI. Check for mistakes.

directive:
# Following is two common directive which are normally required in all the RPs
# 1. Remove the unexpanded parameter set
# 2. For New-* cmdlets, ViaIdentity is not required, so CreateViaIdentityExpanded is removed as well
- where:
variant: ^Create$|^CreateViaIdentity$|^CreateViaIdentityExpanded$|^Update$|^UpdateViaIdentity$
variant: ^(Create|Update)(?!.*?(Expanded|JsonFilePath|JsonString))
Copy link
Preview

Copilot AI Aug 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The regex pattern uses a negative lookahead which may be difficult to understand and maintain. Consider documenting this pattern or using a more explicit approach to specify which variants should be removed.

Copilot uses AI. Check for mistakes.

[Microsoft.Azure.PowerShell.Cmdlets.Compute.Category('Body')]
[Microsoft.Azure.PowerShell.Cmdlets.Compute.Support.OperatingSystemTypes]
[System.String]
Copy link
Preview

Copilot AI Aug 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change from strongly-typed OperatingSystemTypes enum to string reduces type safety and removes IntelliSense support. The PSArgumentCompleter attribute helps but doesn't provide the same compile-time validation as the original enum type.

Copilot uses AI. Check for mistakes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Breaking Change Release This PR contains breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant